fix(registration): display blocked username validation error in UI#39184
fix(registration): display blocked username validation error in UI#39184sahillllllllll-bit wants to merge 2 commits intoRocketChat:developfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (2)📚 Learning: 2026-01-17T01:51:47.764ZApplied to files:
📚 Learning: 2026-02-24T19:36:55.089ZApplied to files:
🔇 Additional comments (1)
WalkthroughAdds handling for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/web-ui-registration/src/RegisterForm.tsx">
<violation number="1" location="packages/web-ui-registration/src/RegisterForm.tsx:93">
P2: Blocked-username handling only checks error.errorType; backend errors can arrive in error.error as well (as shown by existing registration UI). This misses valid payloads and leaves the username error unreported.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Summary
This PR ensures that usernames blocked via
Accounts_BlockedUsernameListare properly displayed as validation errors on the registration form.Previously, when a blocked username (e.g.,
john.doe,sahil.dev) was submitted, the backend correctly returnederror-blocked-username, but the UI did not render the error message. This resulted in no visible feedback for the user.What was changed
error-blocked-usernamein the registration form.error-blocked-username).before :
UI did not render the Error message , but shown in dev tools Network
after changes:
Result
Closes #39182
Summary by CodeRabbit